package com.adcc.loadsheet.monitor.vo;

import com.adcc.loadsheet.monitor.entity.MonitorStatus;

import java.util.HashSet;
import java.util.Set;

// 告警信息类
public class AlarmLogVO {

    // 模块名称
    private String moduleName;

    // 告警信息
    private Set<String> content = new HashSet<>();

    // 模块状态
    private MonitorStatus status = MonitorStatus.ABNORMAL;

    // 上一次模块状态（模块未确认时状态恢复为正常，显示上一次告警状态）
    private MonitorStatus lastStatus = MonitorStatus.ABNORMAL;

    // md5值
    private String md5;

    // 告警信息（前端显示）
    private String alarmInfo;

    // 声音告警信息（前端显示）
    private String moduleAlarmInfo;

    // 添加元素到 contentSet 中，确保不重复
    public void addContent(String element) {
        content.add(element);
    }

    @Override
    public AlarmLogVO clone() {
        AlarmLogVO obj = new AlarmLogVO();
        obj.moduleName = this.moduleName;
        obj.content = this.content;
        obj.status = this.status;
        obj.lastStatus = this.lastStatus;
        return obj;
    }

    public String getModuleName() {
        return moduleName;
    }

    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }

    public Set<String> getContent() {
        return content;
    }

    public void setContent(Set<String> content) {
        this.content = content;
    }

    public MonitorStatus getStatus() {
        return status;
    }

    public void setStatus(MonitorStatus status) {
        this.status = status;
    }

    public MonitorStatus getLastStatus() {
        return lastStatus;
    }

    public void setLastStatus(MonitorStatus lastStatus) {
        this.lastStatus = lastStatus;
    }

    public String getMd5() {
        return md5;
    }

    public void setMd5(String md5) {
        this.md5 = md5;
    }

    public String getAlarmInfo() {
        return alarmInfo;
    }

    public void setAlarmInfo(String alarmInfo) {
        this.alarmInfo = alarmInfo;
    }

    public String getModuleAlarmInfo() {
        return moduleAlarmInfo;
    }

    public void setModuleAlarmInfo(String moduleAlarmInfo) {
        this.moduleAlarmInfo = moduleAlarmInfo;
    }
}


